<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box" style="">
        11
    </div>
    <script src="./common.js"></script>
    <script>
        //  randomColor is not defined
        // 编写一个函数，获得一个十六进制的随机颜色的字符串(例如：#20CD4F)
        var r = randomColor();
        console.log(r);

        box//就是 上面的div 
        // 设置 div的行内样式
        // box.style.color = r;
        box.style.background = r;


    </script>

</body>

</html>